#include <bits/stdc++.h>
using namespace std;
class Solution {
   public:
    int arr[3] = {3, 5, 7};
    int sumOfMultiples(int n) {
        long long sum = 0;
        for (int i = 1; i <= n; i++) {
            if (i % arr[0] == 0 || i % arr[1] == 0 || i % arr[2] == 0) {
                sum += i;
            }
        }
        return sum;
    }
};